#include <stdio.h>
#include <math.h>

long long x[5], y[5];
int n, i;

int nlist;

void deal(long long &a, long long &b)
{
    int i;
    long long maxv;
    maxv = a>b?b:a; 
    for (i=2; i<=maxv; i++)
        if ( (a%i==0) && (b%i==0))
        {
            a /= i;
            b /= i;
            i --;
        }    
}    

int main()
{
    int tx, ty;
  
    while (scanf("%d", &n)!=EOF)
    {
        for (i=1; i<=n; ++i)
        {
           scanf("%d/%d", &tx, &ty);
           x[i] = tx; y[i] = ty;
           deal(x[i], y[i]);
        }    
           
        /*/ debug
        printf("the input list:\n");
        for (i=1; i<=n; ++i)
        {
           printf("%lld", x[i]);
           printf("/%lld\n", y[i]);
        }    
        // debug */
        
        for (i=2; i<=n; ++i)
        {
            x[0] = x[1]*y[i]+x[i]*y[1];          
            y[0] = y[1]*y[i];
            deal(x[0], y[0]);
            x[1] = x[0];
            y[1] = y[0];
        }    
        if (y[1]==1) printf("%lld\n", x[1]);
        else{
            printf("%lld", x[1]);
            printf("/%lld\n", y[1]);
        }    
    }    
 
    return 0;   
}    
/*
2
1/2
1/2
4
1/300
1/299
1/298
1/297
2
1/2
2/3
3
2/4
2/5
2/4

*/
